import request from '@/utils/request'

const api_name = '/product/attrgroup'

export default {

  fetchList(params) {
      return request({
        url: `${api_name}/page`,
        method:'get',
        params:params
      })
  },

  getGroupList(params) {
    return request({
      url:'/product/attrgroup/list',
        method: 'get',
        params: params
    })
  },
    
  getAttrGroup(params) {
    return request({
        url: `${api_name}/info`,
        method:'get',
        params:params
    })
  },
      
  createAttrGroup(data) {
    return request({
      url: '/product/attrgroup/create',
      method: 'post',
      data: data
    })
  },
      
    deleteAttrGroup(data) {
        return request({
          url:'/product/attrgroup/delete',
          method: 'post',
          data: data
        })
    },
      
    updateAttrGroup(data) {
        return request({
          url:'/product/attrgroup/update',
          method: 'post',
          data: data
        })
    },
        
    getGrouptWithAttr(data) {
        return request({
          url:'/product/attrgroup/withattr',
          method: 'get',
          params: data
        })
      }
}

